package com.chen;

import cn.dev33.satoken.SaManager;
import com.chen.common.Constants;
import com.chen.controller.dto.WebSocketService;
import com.fasterxml.jackson.core.JsonProcessingException;

import org.springframework.amqp.core.Queue;
import org.springframework.boot.SpringApplication;

import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.scheduling.annotation.EnableScheduling;


// mavenhelper
@SpringBootApplication
@EnableScheduling //开启定时任务
public class PersoncoderServerApplication {

    public static void main(String[] args) throws JsonProcessingException {
      /*  SpringApplication.run(PersoncoderServerApplication.class, args);
        System.out.println("启动成功：Sa-Token配置如下：" + SaManager.getConfig());*/

        ConfigurableApplicationContext run = SpringApplication.run(PersoncoderServerApplication.class, args);
/*        SpringApplication springApplication = new SpringApplication(PersoncoderServerApplication.class);
        ConfigurableApplicationContext configurableApplicationContext = springApplication.run(args);*/
        WebSocketService.setApplicationContext(run);
    }



/*    @Bean
    public Queue queue(){
        return new Queue(Constants.MMAIL_QUEUE_NAME);
    }*/

}
